#include <iostream>
#include <vector>
using namespace std;

int main()
{
    vector<int> v(6, 6);    //{6,6,6,6,6,6}    
    vector<int>::iterator it = v.begin();
//可能导致容量改变，导致原空间被回收
	//v.insert(v.begin(), 0);
    v.resize(1000, 0);
	//v.reserve(100);
	//v.assign(100, 8);
	//v.push_back(8);

    while(it != v.end()){
        cout << *it << " ";
        ++it;   //迭代器失效
    }
    return 0;
}
